/**
 * ModuleService.java
 */
package org.yate.oa.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.dao.mapper.ModRefPrivilegeMapper;
import org.yate.oa.model.ModRefPrivilegeEntity;
import org.yate.oa.service.IModRefPrivilegeService;

/**
 * @author Yate
 * @date Nov 13, 2013
 * @description TODO
 * @version 1.0
 */
@Service
public class ModRefPrivilegeService extends
		BaseService<ModRefPrivilegeEntity, Long> implements
		IModRefPrivilegeService {

	@Resource(name = "modRefPrivilegeMapper")
	private ModRefPrivilegeMapper mrpDao;

	public ModRefPrivilegeEntity checkPrivilege(long userId, String p_url,
			String m_url) {
		return this.mrpDao.checkPrivilege(userId, p_url, m_url);
	}

	public List<ModRefPrivilegeEntity> getPrivileges(long userId, String url) {
		return this.mrpDao.getPrivileges(userId, url);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.yate.oa.service.imp.BaseService#getMapperDao()
	 */
	@Override
	protected IBaseMapperDao<ModRefPrivilegeEntity, Long> getMapperDao() {
		return this.mrpDao;
	}

}
